<?php

require __DIR__.'/../../../vendor/autoload.php';

use Gateway\app\zszn\NameIDCardAccountVerifyRequest;
use Gateway\ESAliyunGateway;
use Gateway\Log;

/**
 * 银行卡实名三要素，参考文档：https://esandinfo.yuque.com/yv6e1k/aa4qsg/iftlbl
 * 服务开通地址：https://market.aliyun.com/products/57000002/cmapi00042295.html?spm=5176.shop.result.23.6b7c28d89pqdoz&innerSource=search#sku=yuncode3629500001
 */
$appCode = "TODO";// TODO 替换成你自己的appcode, 获取APPCODE  可参考 https://esandinfo.yuque.com/yv6e1k/ulp2ub/fs2mm48opwox3xc4?singleDoc#
//实例化网关对象
$gateway = new ESAliyunGateway($appCode);
//构造请求报文
$request = new NameIDCardAccountVerifyRequest();
$request->accountNo = "62008856445623558";
$request->idName = "李翠花";
$request->idNumber = "596223555698546855";
//向网关发起请求
$rspMsg = $gateway->sendToGateWay(NameIDCardAccountVerifyRequest::$ALIYUN_URL,$request->toJsonStr());
if($rspMsg==null||strlen($rspMsg)==0){
    Log::ERROR("服务器返回内容为空");
    return;
}
Log::DEBUG("服务器返回内容为:".$rspMsg);


